import request from "@/utils/request"

export const entryAll = (search) =>
    request({
        url: "/selectEntryAll",
        method: "get",
        params: {
            value: search.value,
            offset: search.offset,
            limit: search.limit
        }
    })

export const deleteEntry = (id) =>
    request({
        url: "/deleteEntryById" + id,
        method: "delete"
    })

export const addEntry = (entry) =>
    request({
        url: "/addentry",
        method: "post",
        data: entry
    })

export const updateById = (id) =>
    request({
        url: "/beforeEditById" + id,
        method: "post",
    })

export const editEntry = (entry) =>
    request({
        url: "/updateEntry",
        method: "put",
        data: entry
    })

export const selectTeamsAll = () =>
    request({
        url: "/allteams",
        method: "post"
    })